import java.sql.SQLOutput;
//类名一定要使用大驼峰形式
//一个文件只定义一个类
//这个文件为了方便说明写在了一起
//public 修饰的类名和文件名要相同 ,尽量不要修改类名，修改在左边栏里右键修改
class WashMachine{
    //成员属性/字段：是定义在类里面方法的外面
    public String brand;
    public String type;
    public double weight;
    public double length;
    public double weidth;
    public double height;
    public String color;
    public void washClothes(){
        System.out.println("洗衣服功能");
    }
    public void dryClothes(){
        System.out.println("脱水功能");
    }
    public void setTime(){
        System.out.println("定时功能");
    }

}
class Dog{
    public String name;
    public int age;
    public String color;
    public void barks(){
        System.out.println(name+"汪汪汪");
    }
    public void wag(){
        System.out.println(name+"摇尾巴");

    }
}

public class Test2 {
    public static void main(String[] args) {
        //通过new关键字 实例化了一个Dog对象
        Dog dog = new Dog();
        //dog就是一个引用 指向了Dog对象
        dog.name = "蚂蚁";
        dog.color = "黑";
        dog.age = 10;
        System.out.println(dog.name);
        System.out.println(dog.age);
        System.out.println(dog.color);
        dog.barks();//

        int a = 10;
    }
}

